<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" >

<div th:fragment="menu">
    <nav>
        <div>
            <h1 style="color: #3a8ee6">BLOG NETWORK</h1>
        </div>
        <div class="title">
            <p>
                <span th:if="${session.SPRING_SECURITY_CONTEXT!=null}">
                    <span th:text="${session.SPRING_SECURITY_CONTEXT.authentication.principal.nickname}" style="color: #5daf34">
                    </span>
                    <el-link type="primary" href="/api/fore/person/go2PersonCenter">个人中心</el-link>
                    <el-link type="primary"   v-on:click="goLogout()">退出登录</el-link>
                </span>

                <span th:if="${session.SPRING_SECURITY_CONTEXT==null}">
                     <span  style="color: red">游客</span>
                     <el-link type="primary" href="/api/public/goLogin" >去登录</el-link>
                    <el-link type="primary" href="/api/public/goRegister">去注册</el-link>
                </span>
            </p>
        </div>
    </nav>

</div>


